import { Body, Controller, Post } from '@nestjs/common';
import { PageService } from './page.service';
import { ResultData } from 'src/common/utils/result';
import { CreatePageDto } from './dto';

@Controller('page')
export class PageController {
  constructor(private readonly pageService: PageService) {}

  @Post()
  async create(@Body() createPageDto: CreatePageDto) {
    const result = await this.pageService.create(createPageDto);
    return ResultData.ok(result);
  }
}
